import eventActuator from '@/event/eventActuator'

export default (events = []) => {
    const eventInputs =[];
    const eventChanges=[];
    events.forEach(event => {
        const { eventType, } = event
        const result = eventActuator.find(item => item.value == event.eventActuator)
        if (result) {
            if (eventType == "oninput") {
                eventInputs.push(result.actuator)
            }

            if (eventType == "onchange") {
                eventChanges.push(result.actuator)
            }
        }
    })

    return {
        eventInputs,
        eventChanges,
    }
}